body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f4f4f9;
}

h1 {
    color: #007BFF;
}

button {
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 20px;
}

button:hover {
    background-color: #0056b3;
}

#createCourseButton {
    position: absolute;
    top: 20px;
    right: 20px;
}

#viewCoursesButton {
    position: absolute;
    top: 70px;
    right: 20px;
}

#viewMyCoursesButton {
    position: absolute;
    top: 120px;
    right: 20px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 70%;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.course-box {
    background-color: #e9f5ff;
    border: 1px solid #007BFF;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 20px;
}

.course-box h3 {
    margin: 0;
    font-size: 18px;
}

.course-box p {
    margin: 5px 0 0 0;
    font-size: 14px;
}

.course-buttons {
    display: none;
    margin-top: 10px;
}

.course-buttons button {
    margin-right: 10px;
}

#backButton {
    margin-top: 20px;
}
/* 优化创建课程模态框样式 */
/*#createCourseModal .modal-content label {
    display: block;
    margin-bottom: 5px;
}

#createCourseModal .modal-content input,
#createCourseModal .modal-content textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#createCourseModal .modal-content button {
    width: 100%;
}*/

/* 新增章节模态框样式 */
#addChapterModal .modal-content label {
    display: block;
    margin-bottom: 5px;
}

#addChapterModal .modal-content input,
#addChapterModal .modal-content textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#addChapterModal .modal-content button {
    width: 100%;
}

/* 删除章节模态框样式 */
#deleteChapterModal .modal-content label {
    display: block;
    margin-bottom: 5px;
}

#deleteChapterModal .modal-content input {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#deleteChapterModal .modal-content button {
    width: 100%;
}

#coursePreviewModal .modal-content {
    padding: 20px;
}

#coursePreviewModal h3 {
    margin-bottom: 10px;
}

#coursePreviewModal p {
    margin: 5px 0;
}

#coursePreviewModal h4 {
    margin-top: 20px;
    margin-bottom: 10px;
}

#coursePreviewModal ul {
    list-style-type: none;
    padding: 0;
}

#coursePreviewModal li {
    margin-bottom: 5px;
}

#viewCoursesModal .modal-content {
    max-height: 80vh; /* 设置最大高度，可根据需要调整 */
    overflow-y: auto; /* 添加垂直滚动条 */
}

.no-content-message {
    color: #999; /* 浅灰色 */
    text-align: center; /* 居中 */
}

#createClassModal .modal-content label {
    display: block;
    margin-bottom: 5px;
}

#createClassModal .modal-content input {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#createClassModal .modal-content button {
    width: 100%;
}

/* 加入班级模态框样式 */
#joinClassModal .modal-content label {
    display: block;
    margin-bottom: 5px;
}

#joinClassModal .modal-content input {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#joinClassModal .modal-content button {
    width: 48%;
    margin-right: 4px;
}

/* 班级管理相关样式 */
#classList {
    margin-top: 20px;
}

#classesContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#classMembersTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#classMembersTable th, #classMembersTable td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#classMembersTable th {
    background-color: #f2f2f2;
}

.resource-box {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
}

#chapterList .course-box {
    border: 1px solid #ccc;
    padding: 20px; /* 增加内边距 */
    margin-bottom: 20px; /* 增加底部外边距 */
    width: 100%; /* 宽度设置为 100% */
    box-sizing: border-box; /* 确保内边距和边框包含在宽度内 */
}

#chapterList .course-box h3 {
    margin-bottom: 10px;
}

#chapterList .course-box p {
    margin: 5px 0;
}

/* 退选课程按钮样式 */
.drop-course-button {
    background-color: #dc3545; /* 红色背景 */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.drop-course-button:hover {
    background-color: #c82333; /* 鼠标悬停时的背景颜色 */
}

.button-container {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.button-container button {
    width: 48%; /* 两个按钮各占48%宽度，留出4%的间距 */
}